home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / gifpasse.zip / NGIFER.PAS < prev    next >
Pascal/Delphi Source File  |  1989-02-27  |  2KB  |  70 lines

  1. Program ngifer;
  2.  
  3.        { Steve Enns Feb.26 1989
  4.          Copyright 1989 Steve Enns   All rights reserved.
  5.          Synergrafix - Graphical and Numerical Software
  6.          2425 Haultain Ave. Saskatoon, Sask. Canada  S7J 1R2
  7.  
  8.          GIF ENcoding for BGI graphics  ( Demo Program )
  9.  
  10.          This software is provided for unlimited use and
  11.          distribution EXCEPT for the following conditions:
  12.            - No fee is to be charged for the use or distribution
  13.              of this software, including any works which include
  14.              the source code or compiled form of this software.
  15.            - Any derived software or software which uses the source
  16.              code or compiled versions of this software must include
  17.              the source code of the derived software, and this notice.
  18.            - This software is to be distributed in the original
  19.              archived form, with the SAME name, GIFPASSE,
  20.              i.e. GIFPASSE.ZIP, GIFPASSE.ARC.
  21.  
  22.          This software is provided without warranty of any kind,
  23.          express or implied. YOU, the user assume complete
  24.          responsibility for any and all incidental or consequential
  25.          damages arising out of the use of this program. Use
  26.          at your own risk.
  27.  
  28.          This license is intended to encourage the distribution of
  29.          programs which include source code!
  30.  
  31.          'GIF' and 'Graphics Interchange Format' are trademarks
  32.           of Compuserve, Inc., an H&R Block Company. }
  33.  
  34. uses dos,graph,ngif;
  35.  
  36. var gr,grm :integer;
  37.     r,b,g  :colarray;
  38.         i  :integer;
  39. begin
  40.  
  41.    gr:=detect;
  42.    initgraph(gr,grm,getenv('BGIDIR'));
  43.  
  44.    for i:=0 to 200 do
  45.    begin
  46.       setcolor(random(getmaxcolor+1));
  47.       circle(random(getmaxx),random(getmaxy),random(getmaxy div 2));
  48.    end;
  49.  
  50.    for i:=0 to 10 do begin
  51.       r[i]:=0; g[i]:=0; b[i]:=0
  52.    end;
  53.  
  54.    if not engif('testout.gif',0,0,getmaxx,getmaxy,false,true,0,1,r,g,b) then
  55.    begin
  56.       closegraph;
  57.       writeln('NGIFER: Error: error during encoding or file write');
  58.       halt(1)
  59.    end;
  60.  
  61.    closegraph;
  62.    writeln;
  63.    writeln('View TESTOUT.GIF with:');
  64.    writeln;
  65.    writeln('   DGIFER testout.gif    command.');
  66.    writeln
  67.  
  68. end.
  69.  
  70.